package game;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class Panel extends JPanel {
    private BufferedImage image;

    public Panel() {
        try {
            image = ImageIO.read(getClass().getClassLoader().getResource("Images/Backgrounds/splash.bmp"));
        } catch (IOException ex) {}
            //System.out.println("Error loading splash image");
    }
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(image, 0, 0, getWidth(), getHeight(), this);
    }

}
